/**
 * @filename: SendService.java 2020年1月8日
 * @project match-service  V1.0
 * Copyright(c) 2020 flying-cattle Co. Ltd. 
 * All right reserved. 
 */
package com.service.scheduling.binding;

import com.service.dao.dto.HrComboOrder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.messaging.support.MessageBuilder;

/**
 * @ClassName: SendService
 * @Description: TODO(kafka消息发送类)
 * @author flying-cattle
 * @date 2020年1月8日
 */

@Slf4j
@EnableBinding(OrderHrComboSink.class)
public class OrderHrComboSendHandler {
	
	@Autowired
	private OrderHrComboSink source;

	public void sendPayHrComboMsg(HrComboOrder payOrder) {
		log.info("支付礼包订单发送消息:{}", payOrder);
		source.outPayHrComboOrder().send(MessageBuilder.withPayload(payOrder).build());
	}

}
